import pytest

@pytest.fixture()
def data():
    data = ['test', 'pre', 'online']
    return data


@pytest.mark.parametrize('user', ['admin','guest','user'])
@pytest.mark.parametrize('pwd', ['admin123','guest123','user123'])
def test_login(data, user, pwd):
    # print(data)
    for i in range(0, 3):
        print('\nlogging {} as {} with {}'.format(data[i], user, pwd))
        if user in pwd:
            print('登陆成功')
    assert user in pwd
